
<template>
  <div class="main-container">
    <div class="filtrate-bar">
      <div class="title-box">
        <div class="icon-box">
          <span class="wk wk-my-task icon" />
        </div>
        <span class="text">销售排行榜</span>

        <!-- <a-radio-group @change="handleType" v-model="dateTypeId" :style="{ marginBottom: '8px', marginLeft: '10px' }">
          <a-radio-button value="month">本月 </a-radio-button>
          <a-radio-button value="quarter"> 季度 </a-radio-button>
          <a-radio-button value="year"> 年度 </a-radio-button>
        </a-radio-group> -->

        <a-select
          v-model="displayTypeId"
          :style="{ width: '150px', marginBottom: '8px', marginLeft: '10px' }"
          @change="typeChange"
        >
          <a-select-option value="2">按人员 </a-select-option>
          <a-select-option value="1">按BU </a-select-option>
        </a-select>
        <a-select
          v-model="businessItemTypeId"
          :style="{ width: '150px', marginBottom: '8px', marginLeft: '10px' }"
          @change="handleType"
        >
          <a-select-option value="">综合 </a-select-option>
          <a-select-option value="1">仓储 </a-select-option>
          <a-select-option value="2">运输 </a-select-option>
          <a-select-option value="3">货代 </a-select-option>
          <a-select-option value="4">库购 </a-select-option>
        </a-select>
        <a-range-picker :value="dateInterval" format="YYYY-MM-DD" style="margin-left: 10px" @change="changeDate" />

        <!-- <span style="color: red">
          {{ fromDate + '~' + thruDate }}
        </span> -->
      </div>
    </div>

    <div class="content">
      <div class="table-content">
        <div class="handle-bar">
          <!--
          <a-button class="export-btn" type="primary" icon="download" @click="handleExportXls">导出</a-button>
          -->
        </div>
        <a-table
          v-if="displayTypeId == '2'"
          :columns="columnsPer"
          :data-source="personDataList"
          bordered
          :pagination="{ pageSize: 100 }"
          :scroll="{ y: 550 }"
        >
          <template slot="personName" slot-scope="text, record">
            <a-tooltip placement="top">
              <template slot="title">
                <span>{{ record.personName }}</span>
              </template>
              <span v-if="(userInfo().groupId)=='4210'" class="ellipsis" style="text-align: center; width: 100%"
                >{{ record.personName }}</span
              >
              <span v-else class="ellipsis" style="text-align: center; width: 100%"
                ><a @click="() => checkShow(record.list0123456)">{{ record.personName }}</a></span
              >
            </a-tooltip>
          </template>
          <template slot="estimatedSalesAmount" slot-scope="text, record">
            <a-tooltip placement="top">
              <template slot="title">
                <span>{{ record.estimatedSalesAmount | amountFormat }}</span>
              </template>
              <span v-if="(userInfo().groupId)=='4210'" class="ellipsis" style="text-align: center; width: 100%"
                >{{
                  record.estimatedSalesAmount | amountFormat
                }}</span
              >
              <span v-else class="ellipsis" style="text-align: center; width: 100%"
                ><a @click="() => checkShow(record.list01234)">{{
                  record.estimatedSalesAmount | amountFormat
                }}</a></span
              >
            </a-tooltip>
          </template>
          <template slot="successEstimatedSalesAmount" slot-scope="text, record">
            <a-tooltip placement="top">
              <template slot="title">
                <span>{{ record.successEstimatedSalesAmount | amountFormat }}</span>
              </template>
              <span v-if="(userInfo().groupId)=='4210'" class="ellipsis" style="text-align: center; width: 100%"
                >{{
                  record.successEstimatedSalesAmount | amountFormat
                }}</span
              >
              <span v-else class="ellipsis" style="text-align: center; width: 100%"
                ><a @click="() => checkShow(record.list56)">{{
                  record.successEstimatedSalesAmount | amountFormat
                }}</a></span
              >
            </a-tooltip>
          </template>
        </a-table>
        <a-table
          v-if="displayTypeId == '1'"
          :columns="columnsBu"
          :data-source="buDataList"
          bordered
          :pagination="{ pageSize: 100 }"
          :scroll="{ y: 550 }"
        >
          <template  slot="buName" slot-scope="text, record">
            <a-tooltip placement="top">
              <template slot="title">
                <span>{{ record.buName }}</span>
              </template>
               <span v-if="(userInfo().groupId)=='4210'" class="ellipsis" style="text-align: center; width: 100%"
                >{{ record.buName }}</span
              >
              <span v-else class="ellipsis" style="text-align: center; width: 100%"
                ><a @click="() => checkShow(record.list0123456)">{{ record.buName }}</a></span
              >
            </a-tooltip>
          </template>
          <template  slot="estimatedSalesAmount" slot-scope="text, record">
            <a-tooltip placement="top">
              <template slot="title">
                <span>{{ record.estimatedSalesAmount | amountFormat }}</span>
              </template>
               <span v-if="(userInfo().groupId)=='4210'" class="ellipsis" style="text-align: center; width: 100%"
                >{{ record.estimatedSalesAmount | amountFormat }}</span
              >
              <span v-else class="ellipsis" style="text-align: center; width: 100%"
                ><a @click="() => checkShow(record.list01234)">{{ record.estimatedSalesAmount | amountFormat }}</a></span
              >
            </a-tooltip>
          </template>
          <template  slot="successEstimatedSalesAmount" slot-scope="text, record">
            <a-tooltip placement="top">
              <template slot="title">
                <span>{{ record.successEstimatedSalesAmount | amountFormat }}</span>
              </template>
              <span v-if="(userInfo().groupId)=='4210'" class="ellipsis" style="text-align: center; width: 100%"
                >{{
                  record.successEstimatedSalesAmount | amountFormat
                }}</span
              >
              <span v-else class="ellipsis" style="text-align: center; width: 100%"
                ><a @click="() => checkShow(record.list56)">{{
                  record.successEstimatedSalesAmount | amountFormat
                }}</a></span
              >
            </a-tooltip>
          </template>
        </a-table>
      </div>

      <div class="analysis-content">
        <div id="barview1" />
      </div>

      <div class="analysis-content">
        <div id="barview2" />
      </div>
    </div>

    <business-list ref="checkModel" @handleShow="handleViewDrawer"></business-list>
    <business-modal ref="modalFormDrawer"></business-modal>
  </div>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { postAction, getAction, downFile } from '@/api/manage'
import BusinessList from './components/BusinessList'
import BusinessModal from '@/views/crm/business/modules/CrmBusinessModal__Style#Drawer'
import { mapGetters } from 'vuex'
function number_format(number, decimals, dec_point, thousands_sep) {
  /*
   * 参数说明：
   * number：要格式化的数字
   * decimals：保留几位小数
   * dec_point：小数点符号
   * thousands_sep：千分位符号
   * */
  number = (number + '').replace(/[^0-9+-Ee.]/g, '')
  var n = !isFinite(+number) ? 0 : +number,
    prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
    sep = typeof thousands_sep === 'undefined' ? ',' : thousands_sep,
    dec = typeof dec_point === 'undefined' ? '.' : dec_point,
    s = '',
    toFixedFix = function (n, prec) {
      var k = Math.pow(10, prec)
      return '' + Math.ceil(n * k) / k
    }

  s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.')
  var re = /(-?\d+)(\d{3})/
  while (re.test(s[0])) {
    s[0] = s[0].replace(re, '$1' + sep + '$2')
  }

  if ((s[1] || '').length < prec) {
    s[1] = s[1] || ''
    s[1] += new Array(prec - s[1].length + 1).join('0')
  }
  return s.join(dec)
}
export default {
  name: 'statistics',
  mixins: [JeecgListMixin],
  components: {
    BusinessList,
    BusinessModal,
  },

  data() {
    return {
      fromDate: '',
      thruDate: '',
      dateTypeId: 'month',
      dateInterval: [this.startDate(), this.endDate()],
      businessItemTypeId: '',
      displayTypeId: '2',
      chartAnalysis1: null,
      chartAnalysis2: null,
      analysis1Option: null,
      analysis2Option: null,
      columns: [],
      columnsPer: [
        {
          title: '排行',
          dataIndex: '',
          key: 'rowIndex',
          width: 100,
          align: 'center',
          customRender: function (t, r, index) {
            if (r.rank == '汇总') {
              return '汇总'
            } else {
              return parseInt(index) + 1
            }
          },
        },
        {
          title: '人员',
          dataIndex: 'personName',
          align: 'center',
          sorter: (a, b) => a.personName.length - b.personName.length,
          sortDirections: ['descend', 'ascend'],
          scopedSlots: { customRender: 'personName' },
        },
        {
          title: '所属BU',
          dataIndex: 'buName',
          align: 'center',
          sorter: (a, b) => a.buName.length - b.buName.length,
          sortDirections: ['descend', 'ascend'],
        },
        {
          title: '商机数量',
          dataIndex: 'businessNum',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.businessNum - b.businessNum
            }
          },
        },
        {
          title: '子商机数量',
          dataIndex: 'businessItemNum',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.businessItemNum - b.businessItemNum
            }
          },
        },
        {
          title: '商机金额',
          dataIndex: 'estimatedSalesAmount',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.estimatedSalesAmount - b.estimatedSalesAmount
            }
          },
          scopedSlots: { customRender: 'estimatedSalesAmount' },
        },
        {
          title: '签约数量',
          dataIndex: 'successBusinessNum',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.successBusinessNum - b.successBusinessNum
            }
          },
        },
        {
          title: '签约金额',
          dataIndex: 'successEstimatedSalesAmount',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.successEstimatedSalesAmount - b.successEstimatedSalesAmount
            }
          },
          scopedSlots: { customRender: 'successEstimatedSalesAmount' },
        },
      ],
      personDataList: [],
      columnsBu: [
        {
          title: '排行',
          dataIndex: '',
          key: 'rowIndex',
          width: 100,
          align: 'center',
          customRender: function (t, r, index) {
            if (r.rank == '汇总') {
              return '汇总'
            } else {
              return parseInt(index) + 1
            }
          },
        },
        {
          title: 'BU',
          dataIndex: 'buName',
          align: 'center',
          sorter: (a, b) => a.buName.length - b.buName.length,
          sortDirections: ['descend', 'ascend'],
          // scopedSlots: { customRender: 'buName' },
        },

        {
          title: '商机数量',
          dataIndex: 'businessNum',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.businessNum - b.businessNum
            }
          },
        },
        {
          title: '商机金额',
          dataIndex: 'estimatedSalesAmount',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.estimatedSalesAmount - b.estimatedSalesAmount
            }
          },
          scopedSlots: { customRender: 'estimatedSalesAmount' },
        },
        {
          title: '签约数量',
          dataIndex: 'successBusinessNum',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.successBusinessNum - b.successBusinessNum
            }
          },
        },
        {
          title: '签约金额',
          dataIndex: 'successEstimatedSalesAmount',
          align: 'center',
          sorter: (a, b) => {
            if (a.rank == '汇总' || b.rank == '汇总') {
              return
            } else {
              return a.successEstimatedSalesAmount - b.successEstimatedSalesAmount
            }
          },
          scopedSlots: { customRender: 'successEstimatedSalesAmount' },
        },
      ],
      buDataList: [],
      url: {
        list: 'api/',
        crmBusinessRanking: '/online/api/crmBusinessRanking20',
        exportXlsUrl: '/online/api/export/exportXlsGraphReport',
      },

      buXDataListqy: [],
      perXDataListqy: [],
      buXDataListsj: [],
      perXDataListsj: [],
      buDataListqy: [],
      perDataListqy: [],
      buDataListsj: [],
      perDataListsj: [],
    }
  },
  computed: {},
  watch: {},
  mounted() {
    this.getDataList()
  },
  methods: {
    ...mapGetters(['userInfo']),
    // 导出表格
    handleExportXls(fileName) {
      if (!fileName || typeof fileName != 'string') {
        fileName = '导出文件'
      }
      let param = { id: this.reportId }
      downFile(this.url.exportXlsUrl, param).then((data) => {
        if (!data) {
          this.$message.warning('文件下载失败')
          return
        }
        if (typeof window.navigator.msSaveBlob !== 'undefined') {
          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
        } else {
          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
          let link = document.createElement('a')
          link.style.display = 'none'
          link.href = url
          link.setAttribute('download', fileName + '.xls')
          document.body.appendChild(link)
          link.click()
          document.body.removeChild(link) //下载完成移除元素
          window.URL.revokeObjectURL(url) //释放掉blob对象
        }
      })
    },
    getDataList() {
      this.chartAnalysis1 = this.echarts.init(document.getElementById('barview1'))
      this.chartAnalysis2 = this.echarts.init(document.getElementById('barview2'))
      this.analysis1Option = {
        title: {
          text: '签约金额排行榜图',
          left: 'center',
        },
        dataZoom: [
          {
            // 控制图表左右滑动
            width: '15',
            type: 'slider',
            show: false, //flase直接隐藏图形
            xAxisIndex: [0],
            left: 33, //滚动条靠左侧的百分比
            bottom: 40,
            height: 20, //组件高度
            start: 0, //滚动条的起始位置
            showDataShadow: false, //是否显示数据阴影
            showDetail: false, //是否显示想洗数值信息
            end: 50, //滚动条的截止位置（按比例分割你的柱状图x轴长度）
          },
          {
            type: 'inside',
            show: true,
            xAxisIndex: [0],
            start: 0, //滚动条的起始位置
            end: 0.25, //滚动条的截止位置（按比例分割你的柱状图x轴长度）
          },
        ],
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            // 坐标轴指示器，坐标轴触发有效
            type: 'shadow', // 默认为直线，可选为：'line' | 'shadow'
          },
          // formatter: function (params, ticket, callback) {
          //   var htmlStr = ''
          //   for (var i = 0; i < params.length; i++) {
          //     var param = params[i]
          //     var xName = param.name
          //     var seriesName = param.seriesName
          //     var value = param.value ? param.value + '%' : '-'
          //     var color = param.color
          //     if (i === 0) {
          //       htmlStr += xName + '<br/>'
          //     }
          //     htmlStr += '<div>'
          //     htmlStr +=
          //       '<span style="margin-right:5px;display:inline-block;width:10px;height:10px;border-radius:5px;background-color:' +
          //       color +
          //       ';"></span>'
          //     htmlStr += seriesName + '：' + value
          //     htmlStr += '<div/>'
          //   }
          //   return htmlStr
          // },
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true,
        },
        xAxis: [
          {
            axisLabel: {
              interval: 0,
              rotate: 30,
            },
            type: 'category',
            data: [],
          },
        ],
        yAxis: [
          {
            type: 'value',
            // axisLabel: {
            //   formatter: '{value}%',
            // },
          },
        ],
        series: [
          {
            type: 'bar',
            color: '#0000FF',
            barWidth: '20%',
            label: {
              show: true,
              position: 'top',
              offset: [0, 5],
              formatter(params, ticket, callback) {
                return number_format(params.value, 0, '.', ',')
              },
            },
            emphasis: {
              focus: 'series',
            },
            data: [],
          },
        ],
      }

      this.analysis2Option = {
        title: {
          text: '商机金额排行榜图',
          left: 'center',
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            // 坐标轴指示器，坐标轴触发有效
            type: 'shadow', // 默认为直线，可选为：'line' | 'shadow'
          },
        },
        dataZoom: [
          {
            // 控制图表左右滑动
            width: '15',
            type: 'slider',
            show: false, //flase直接隐藏图形
            xAxisIndex: [0],
            left: 33, //滚动条靠左侧的百分比
            bottom: 40,
            height: 20, //组件高度
            start: 0, //滚动条的起始位置
            showDataShadow: false, //是否显示数据阴影
            showDetail: false, //是否显示想洗数值信息
            end: 50, //滚动条的截止位置（按比例分割你的柱状图x轴长度）
          },
          {
            type: 'inside',
            show: true,
            xAxisIndex: [0],
            start: 0, //滚动条的起始位置
            end: 0.25, //滚动条的截止位置（按比例分割你的柱状图x轴长度）
          },
        ],
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true,
        },
        xAxis: [
          {
            axisLabel: {
              interval: 0,
              rotate: 30,
            },
            type: 'category',
            data: [],
          },
        ],
        yAxis: [
          {
            type: 'value',
          },
        ],
        series: [
          {
            type: 'bar',
            color: '#0080FF',
            barWidth: '20%',
            label: {
              show: true,
              position: 'top',
              offset: [0, 5],
              formatter(params, ticket, callback) {
                return number_format(params.value, 0, '.', ',')
              },
            },
            emphasis: {
              focus: 'series',
            },
            data: [],
          },
        ],
      }
      const param = {}
      param.createTime_fld0_value = this.dateInterval[0]
      param.createTime_fld1_value = this.dateInterval[1]
      param.typeId = this.businessItemTypeId
      // param.dateTypeId = this.dateTypeId
      param.pageSize = 100
      getAction(this.url.crmBusinessRanking, param).then((res) => {
        if (res.success) {
          this.fromDate = res.result.workMap.fromDate
          this.thruDate = res.result.workMap.thruDate
          this.personDataList = res.result.workMap.personDataList
          this.buDataList = res.result.workMap.buDataList
          let buListqy = []
          let buListsj = []
          let perListqy = []
          let perListsj = []
          let budataListqy = []
          let budataListsj = []
          let perdataListqy = []
          let perdataListsj = []
          let afterbudataListqy = []
          let afterbudataListsj = []
          let afterperdataListqy = []
          let afterperdataListsj = []

          afterbudataListqy = res.result.workMap.buDataList.slice(0,-1)
          afterperdataListqy = res.result.workMap.personDataList.slice(0,-1)
          afterbudataListsj = res.result.workMap.buDataList.slice(0,-1)
          afterperdataListsj = res.result.workMap.personDataList.slice(0,-1)

          afterbudataListqy.sort(this.mySort2('successEstimatedSalesAmount'))
          afterperdataListqy.sort(this.mySort2('successEstimatedSalesAmount'))
          afterbudataListsj.sort(this.mySort2('estimatedSalesAmount'))
          afterperdataListsj.sort(this.mySort2('estimatedSalesAmount'))

          // 签约金额
          afterbudataListqy.forEach((e) => {
            buListqy.push(e.buName)
            if (e.successEstimatedSalesAmount) {
              budataListqy.push(e.successEstimatedSalesAmount)
            } else {
              budataListqy.push(0)
            }
          })
          afterperdataListqy.forEach((e) => {
            perListqy.push(e.personName)
            perdataListqy.push(e.successEstimatedSalesAmount)
          })
          // 商机金额
          afterbudataListsj.forEach((e) => {
            buListsj.push(e.buName)
            if (e.estimatedSalesAmount) {
              budataListsj.push(e.estimatedSalesAmount)
            } else {
              budataListsj.push(0)
            }
            // budataListsj.push(e.estimatedSalesAmount)
          })
          afterperdataListsj.forEach((e) => {
            perListsj.push(e.personName)
            if (e.estimatedSalesAmount) {
              perdataListsj.push(e.estimatedSalesAmount)
            } else {
              perdataListsj.push(0)
            }
            // perdataListsj.push(e.estimatedSalesAmount)
          })

          this.buXDataListqy = buListqy
          this.perXDataListqy = perListqy
          this.buXDataListsj = buListsj
          this.perXDataListsj = perListsj
          this.buDataListqy = budataListqy
          this.perDataListqy = perdataListqy
          this.buDataListsj = budataListsj
          this.perDataListsj = perdataListsj
          if (this.displayTypeId == '2') {
            this.analysis1Option.xAxis[0].data = this.perXDataListqy
            this.analysis1Option.series[0].data = this.perDataListqy
            this.analysis2Option.xAxis[0].data = this.perXDataListsj
            this.analysis2Option.series[0].data = this.perDataListsj
          } else {
            this.analysis1Option.xAxis[0].data = this.buXDataListqy
            this.analysis1Option.series[0].data = this.buDataListqy
            this.analysis2Option.xAxis[0].data = this.buXDataListsj
            this.analysis2Option.series[0].data = this.buDataListsj
          }

          this.$nextTick(() => {
            this.chartAnalysis1.setOption(this.analysis1Option, true)
            this.chartAnalysis2.setOption(this.analysis2Option, true)
          })
        }
      })
    },
    typeChange(e) {
      if (e == '1') {
        this.analysis1Option.xAxis[0].data = this.buXDataListqy
        this.analysis1Option.series[0].data = this.buDataListqy
        this.analysis2Option.xAxis[0].data = this.buXDataListsj
        this.analysis2Option.series[0].data = this.buDataListsj
      } else {
        this.analysis1Option.xAxis[0].data = this.perXDataListqy
        this.analysis1Option.series[0].data = this.perDataListqy
        this.analysis2Option.xAxis[0].data = this.perXDataListsj
        this.analysis2Option.series[0].data = this.perDataListsj
      }
      this.$nextTick(() => {
        this.chartAnalysis1.setOption(this.analysis1Option, true)
        this.chartAnalysis2.setOption(this.analysis2Option, true)
      })
    },
    changeDate(date, dateString) {
      if (dateString[0] == '' && dateString[1] == '') {
        this.dateInterval = [this.startDate(), this.endDate()]
      } else {
        this.dateInterval = dateString
      }

      this.getDataList()
    },
    //获取当前日期
    endDate() {
      var myDate = new Date()
      var nowY = myDate.getFullYear()
      var nowM = myDate.getMonth() + 1
      var nowD = myDate.getDate()
      var enddate = nowY + '-' + (nowM < 10 ? '0' + nowM : nowM) + '-' + (nowD < 10 ? '0' + nowD : nowD) //当前日
      return enddate
    },

    //获取三十天前日期
    startDate() {
      var myDate = new Date()
      var lw = new Date(myDate - 1000 * 60 * 60 * 24 * 30) //最后一个数字30可改，30天的意思
      var lastY = lw.getFullYear()
      var lastM = lw.getMonth() + 1
      var lastD = lw.getDate()
      var startdate = lastY + '-' + (lastM < 10 ? '0' + lastM : lastM) + '-' + (lastD < 10 ? '0' + lastD : lastD) //三十天之前日期
      return startdate
    },
    mySort2(property) {
      return function (a, b) {
        var value1 = a[property]
        var value2 = b[property]
        return value2 - value1
      }
    },

    /**
     * 导出点击
     */
    exportClick() {
      this.requestExportInfo(biCustomerTotalListExportAPI, this.listPostParams)
    },
    handleType() {
      const param = {}
      param.typeId = this.businessItemTypeId
      param.createTime_fld0_value = this.dateInterval[0]
      param.createTime_fld1_value = this.dateInterval[1]
      this.$nextTick(() => {
        this.getDataList()
      })
    },
    checkShow(arr) {
      this.$refs.checkModel.show(arr)
    },
  },
}
</script>


<style lang="less" scoped>
.main-container {
  border: 1px solid #e6e6e6;
  border-radius: 2px;
  background-color: white;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.filtrate-bar {
  background-color: white;
  padding: 15px 20px 5px 20px;
  margin-right: 15px;
  line-height: 34px;
  .icon-box {
    width: 34px;
    height: 34px;
    text-align: center;
    line-height: 34px;
    color: #168a40;
    background-color: #dfe8ff;
    border-radius: 50%;
    margin-right: 10px;
    float: left;
  }
  .text {
    font-size: 17px;
    font-weight: 700;
  }
}

.content {
  height: calc(100% - 54px);
  overflow-y: auto;
  padding: 10px 0;
}

.content-title {
  padding: 10px 20px 5px;
  font-size: 16px;
  color: #333;
}

.axis-content {
  padding: 20px 10% 40px;
  position: relative;
  .axismain,
  #axismain {
    margin: 0 auto;
    width: 95%;
    height: 400px;
  }
}

.analysis-content {
  min-width: 1175px;
  padding: 8px 10px;
  #barview1 {
    margin: 0 auto;
    width: 95%;
    height: 400px;
  }
  #barview2 {
    margin: 0 auto;
    width: 95%;
    height: 400px;
  }
}

.table-content {
  padding: 0 60px 20px 60px;
}

.export-button {
  float: right;
  margin-right: 22px;
}

// 导出操作bug
.handle-bar {
  margin-bottom: 8px;
  text-align: right;
}

.search-box {
  padding-right: 15px;
}

.radio-box {
  padding: 0 20px;
  margin-bottom: 15px;
  /deep/ .el-radio__label {
    color: #99a9bf !important;
  }
}

.static {
  padding: 0 20px;
  margin-bottom: 10px;
  .text {
    font-size: 13px;
    color: #99a9bf;
    display: inline-block;
  }
  .text:not(:last-child) {
    margin-right: 15px;
  }
}
</style>

